package day20171221;

import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test {
    public static void main(String[] args) {

        Map<String, Integer> map = new HashMap<>();
        String stuNo = "";
        //字符流的方式读文件
        String path = "D\\names.txt";
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new FileReader(path));
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
                try {
                    reader.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
        }
        File file =new File("D\\16信本2班Java作业一");
        File[] files=file.listFiles();
        //遍历
        for(File f:files){
            String fileName=f.getName();
            //保存提取到学号
            String no="";
            //从文件名中提取学号
            //正则表达式：1模板；2三个填空
            Matcher matcher= Pattern.compile("").matcher("");
            while (matcher.find()){
                matcher.group();
            }


        }
    }

}
